<?php
/**
 * Created by PhpStorm.
 * User: 庆金
 * Date: 2019-12-13
 * Time: 22:32
 */
use Swoole\Coroutine\System;
$filename = __DIR__ . "/1.log";
go(function () use ($filename)
{
    // FILE_APPEND 追加，如果不填写则为替换
    $r =  System::writeFile($filename,"hello swoole!".date("Y-m-d H:i:s").PHP_EOL,FILE_APPEND);
    echo "success".PHP_EOL;
//    var_dump($r);
});
echo "start".PHP_EOL;